﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BASE;
public partial class Head_Header : System.Web.UI.UserControl
{
    public string username = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Utils.getStringSession("masv") == "")
        {
            link_sua.Visible = false;
            link_logout.Visible = false;
        }
        else
        {
            link_sua.Visible = true;
            link_logout.Visible = true;
            lb_ten.Text = Utils.getStringSession("ten");
            if (Utils.getStringSession("masv") != "")
            {
                lb_msv.Text = " (" + Utils.getStringSession("masv") + ") ";
            }
        }

    }
    protected void link_logout_Click(object sender, EventArgs e)
    {
        Session.Clear();
        lb_ten.Text = "Bạn";
        lb_msv.Text = "";
        link_sua.Visible = false;
        link_logout.Visible = false;
        Response.Redirect("/");
    }
}